<?php

/**
 * index actions.
 *
 * @package    lezgro
 * @subpackage index
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class indexActions extends sfActions {

    /**
     * Executes index action
     *
     * @param sfRequest $request A request object
     */
    public function executeIndex(sfWebRequest $request) {
        $this->bg_class = 'bg_index';
        $this->page_title = 'Lezgro';
        $this->portfolios= PortfolioTable::getLastI18NPortfolios();
        if($request->isXmlHttpRequest()) {
            $response = array();
            $response['html'] = $this->getPartial('index',array('portfolios'=>$this->portfolios));
            $response['title'] = $this->page_title;
            $response['bg_class'] = $this->bg_class;
            return $this->renderText(json_encode($response));
        }
        $this->getResponse()->setTitle($this->page_title);
    }

}
